package com.viroyal.monitorlib.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.viroyal.monitorlib.service.MainStartService;
import com.viroyal.monitorlib.utils.Constants;
import com.viroyal.monitorlib.utils.SPUtils;

/**
 * Created by cxy_nj on 2017/4/28.
 */
public class OpenReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        context.startService(new Intent(context, MainStartService.class));
        SPUtils.getInstance(context).put(Constants.IS_SERVICE_STARTED, true);
    }
}
